<!DOCTYPE html>
<html>
    <head>
        <style>
            form{
                width: 200px;
                height: 200px;
                padding: 0px 20px 35px;
                margin: 25px auto;
                font-size: 18px;
                background-color:aliceblue;
                border-radius: 10px;
                border: 1px solid black;
            }
            .p2{
                text-align: center;
                font-weight:bold;
            }
            .p1{
                text-align: center;
                width: 110px;
                height: 25px;
                border-radius: 5px;
                margin: 5px auto 20px 42px;
                background-color: black;
                color: aliceblue;
            }
            .p4{
                background-color: black;
                color: aliceblue;
                padding: 10px;
            }
            
        </style>
        <script>
            function dl(a){
            const zh = document.getElementById('zh').value;
            const mima = document.getElementById('mima').value;
            if(zh===""){
                alert("账号不能为空");
                return;
            }else if(mima===""){
                alert("密码不能为空");
                return;
            }else if(zh.length<3){
                alert("账号长度少于3位");
                return;
            }else if(mima.length<6){
                alert("密码长度少于6位");
                return;
            }else if(zh=='admin' && mima=='123456'){
                window.location.href="首页.html";
            }else{
                alert("密码或账号错误");
            }
        }
        </script>
    </head>
    <body>
        <p class="p4"><a style="margin-right: 650px;">WHITE</a> <a style="margin-left: 50px;">首页</a> 
        <a style="margin-left: 50px;">关于</a> 
        <a style="margin-left: 50px;">照片集</a> 
        <a style="margin-left: 50px;">服务</a> 
        <a style="margin-left: 50px;">微博</a> 
        <a style="margin-left: 50px;">联系</a> 
        <a style="margin-left: 50px;">登录</a> </p>
        <form>
        <p class="p2">登录</p>
        <p class="p3">账号：<input id="zh" type="datetime" size="20"></p>
        <p class="p3">密码：<input id="mima" type="password" size="20"></p>
        <input class="p1" type="submit" name="" value="登录" onclick="dl()">
        </form>
    </body>
</html>